<template>
  <div>
    <div class="content">
      <div  class="content-wxparse">

        <wxParse  :content="info">  </wxParse>
      </div>

    </div>
    <Contact> </Contact>
  </div>
</template>

<script>
  const wxapp = getApp()
  import Contact from '@/components/Contact.vue'
  import wxParse from 'mpvue-wxparse'
  export default {
    data() {
      return {
        info : '',
      }
    },

    components: {
      wxParse,
      Contact
    },

    methods: {
      getInfo() {
        let that = this
        let id = this.$root.$mp.query.id
        if(!id) {
          wx.showToast({
            title: '参数不对.',
            icon: 'success',
            duration: 2000
          })
        }
        wx.request({
          url: wxapp.globalData.ROOT_URL, //仅为示例，并非真实的接口地址
          data: {
             id,
             service: 'App.Hong.GetDetailInfo',
             table: '5_news'
          },
          success: function(res) {
            that.info = res.data.data.result.content
          }
        })

      }

    },

    onShow(){
      console.log('onShow',this.$root.$mp.appOptions);
    },
    onLoad() {
      this.getInfo()
      console.log('onLoad',this.$root.$mp.query);
    }
  }
</script>
<style>
.wxParse view{
  padding: 0 10rpx;
}
</style>

<style scoped>

  .content{
    font-size: 25rpx;
    box-sizing: border-box;
    padding: 0 10rpx;
  }

</style>
